package com.campus.common.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AuthorityMapper {
    @Select("select distinct `key` from role_authority where role_id = (select role_id from user_role where user_id = #{userId})")
    List<String> getAuthorityByUserId(int userId);
}
